
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObject;
using DataAccessLayer;

namespace BusinessLogic
{
    /// <summary>
    /// Define ChiTietPhieuBanHangUtil class. This class user for BussinessLayer.

    /// </summary>
    public class ChiTietPhieuBanHangUtil
    {
        /// <summary>
        /// Define function Insert for ChiTietPhieuBanHang Object.
        /// </summary>
        /// <param name="t">object data need Insert.</param>
        /// <returns>
        ///    True: if insert successfull.
        ///    False: if insert error.
        ///</returns>
        public static bool Insert(ChiTietPhieuBanHang t)
        {

            return ChiTietPhieuBanHangDao.Insert(t);
        }
        /// <summary>
        /// Define function Update for ChiTietPhieuBanHang Object.
        /// </summary>
        /// <param name="t">project data need updated.</param>
        /// <returns>
        ///    True: if update successful.
        ///    False: if update Error.
        ///</returns>
        public static bool Update(ChiTietPhieuBanHang t)
        {

            return ChiTietPhieuBanHangDao.Update(t);
        }
        /// <summary>
        /// Get All ChiTietPhieuBanHang object from table ChiTietPhieuBanHang.
        /// </summary>
        /// <returns>List ChiTietPhieuBanHang object.</returns>
        public static List<ChiTietPhieuBanHangResult> GetAll()
        {
            return ChiTietPhieuBanHangDao.GetAll();
        }
        /// <summary>
        /// Search ChiTietPhieuBanHang object in table ChiTietPhieuBanHang.
        /// </summary>
        /// <param name="t">Condition for Search.</param>

        /// <returns>List ChiTietPhieuBanHangResult objects.</returns>

        public static List<ChiTietPhieuBanHangResult> SearchChiTietPhieuBanHangSomeCondition(ChiTietPhieuBanHang t)
        {
            return ChiTietPhieuBanHangDao.SearchChiTietPhieuBanHangSomeCondition(t);
        }
        /// <summary>
        /// Get a ChiTietPhieuBanHang data object by primary key. 
        /// </summary>
        /// <param name="maPhieuBanHang" >This is primary key.</param>
        /// <param name="maMatHang" >This is primary key.</param>
        /// <returns>A ChiTietPhieuBanHang object.</returns>

        public static ChiTietPhieuBanHang Get(Int64 maPhieuBanHang, string maMatHang)
        {
            return ChiTietPhieuBanHangDao.Get(maPhieuBanHang, maMatHang);
        }
        /// <summary>
        /// This function to Delete ChiTietPhieuBanHang object by primary key.
        /// </summary>
        /// <param name="maPhieuBanHang" >This is primary key.</param>
        /// <param name="maMatHang" >This is primary key.</param>
        /// <returns>If succesful return True else  return False.</returns>

        public static bool Delete(Int64 maPhieuBanHang, string maMatHang)
        {

            return ChiTietPhieuBanHangDao.Delete(maPhieuBanHang, maMatHang);
        }
        public static List<ChiTietPhieuBanHangResult> GetByMaPhieuBanHang(Int64 maPhieuBanhang)
        {
            return ChiTietPhieuBanHangDao.GetByMaPhieuBanHang(maPhieuBanhang);
        }
    }
}